<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2022/11/29
  Time: 23:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="bean.HelpBean" %>
<%@ page import="bean.Help" %>
<jsp:useBean id="helpBean" class="bean.HelpBean" scope="application"/>
<%@ page import="bean.ServiceBean" %>
<%@ page import="bean.Service" %>
<jsp:useBean id="serviceBean" class="bean.ServiceBean" scope="application"/>
<style>
    #tom{
        font-family:宋体;font-size:20;
    }
</style>
<style>
    body {
        background: url(../image/sport.png) no-repeat center center fixed;
        /*兼容浏览器版本*/
        -webkit-background-size: cover;
        -o-background-size: cover;
        background-size: cover;
    }
</style>
<html>
<body id="tom">
<center>
    <h1>欢迎来到河南工业大学运动会管理系统！</h1>
    <table border="1">
        <tr>
            <th width="30">编号</th>
            <th width="30">名称</th>
            <th width="150">需要服务</th>
            <th width="80">处理情况</th>
        </tr>
        <%
            helpBean=(HelpBean) application.getAttribute("helpBean");
            helpBean.link();
            helpBean.getHelpArrayList().clear();
            helpBean.loadHelp();
            String id=(String) session.getAttribute("userID");
            serviceBean=(ServiceBean) application.getAttribute("serviceBean");
            serviceBean.link();
            serviceBean.getServiceArrayList().clear();
            serviceBean.loadService();
            for(Service j:serviceBean.getServiceArrayList()){
                if(id.equals(j.getVol())){
                    for(Help i:helpBean.getHelpArrayList()){
                        if(j.getId().equals(i.getId())){
                            out.println("<tr class='test-c'>");
                            out.println("<td>"+i.getId()+"</td>");
                            out.println("<td>"+i.getName()+"</td>");
                            out.println("<td>"+i.getTrouble()+"</td>");
                            out.println("<td>"+i.getSolve()+"</td>");
                            out.println("</tr>");
                        }
                    }
                }
            }
        %>
    </table>
    <form action="VolSolveServlet" method="post">
        请输入要处理的编号:<input type="text" size="10" name="id"/><br>
        请输入要处理的选手:<input type="text" size="10" name="name"/><br>
        <br><input type="submit" name="submit" value="处理">
    </form>
    <a href="vol_index.jsp">返回</a>
</center>
</body>
</html>
